public abstract class Hero {
    private String name;
    private int HP;
    private int MP;
    private int attack;
    private int defense;

    public Hero() {
    }

    public Hero(String name, int HP, int MP, int attack, int defense) {
        this.name = name;
        this.HP = HP;
        this.MP = MP;
        this.attack = attack;
        this.defense = defense;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getHP() {
        return HP;
    }

    public void setHP(int HP) {
        this.HP = HP;
    }

    public int getMP() {
        return MP;
    }

    public void setMP(int MP) {
        this.MP = MP;
    }

    public int getAttack() {
        return attack;
    }

    public void setAttack(int attack) {
        this.attack = attack;
    }

    public int getDefense() {
        return defense;
    }

    public void setDefense(int defense) {
        this.defense = defense;
    }
    public abstract void said();
    public abstract void startFirstAbility();
    public abstract void startSecondAbility();
    public abstract void startThirdAbility();
    public void startAbility(jineng Jineng){
        if (this.MP<Jineng.getMMP()){
            System.out.println("技能发动失败，没蓝了傻逼");
        }else {
            this.MP-= Jineng.getMMP();
            double sh = this.attack*Jineng.getAdd();
            System.out.println(this.name+"发动技能"+Jineng.getName()+"，耗费"+Jineng.getMMP()+"点魔法，对敌人造成"+sh+"点攻击！");
        }
    }
}
